﻿Chenxin.UI.EmployeeOprLogs = Chenxin.extend(Chenxin.UI.PageCommon, {
    autoInitForm: false,
    actionUrl: '/service/logic/EmployeeOprLogs.ashx',
    createSearch: function() {
        return new Chenxin.UI.EmployeeOprLogsSearch({
            scope: this
        });
    },
    createGrid: function() {
        return new Chenxin.UI.JsonGrid({
            actionUrl: this.actionUrl + '?op=getlist',
            pageSize: 100,
            hasPage: true,
            cellBorder: true,
            height: 400,
            autoLoad: false,
            renderTo: 'EmployeeOprLogs_table',
            hasCheckBox: false,
            id: 'searchtable',
            title: '用户操作日志',
            scope: this,
            columns: {
                TrackerName: {
                    width: 80,
                    head: '操作人',
                    sortable: true
                },
                TraceDepart: {
                    width: 120,
                    head: '操作部门',
                    sortable: true
                },
                TraceTime: {
                    width: 140,
                    head: '操作时间',
                    sortable: true
                },
                TraceType: {
                    width: 120,
                    head: '操作类型',
                    sortable: true
                },
                OprContext: {
                    width: 500,
                    head: '操作内容',
                    sortable: true
                }
            }
        });
    },
    initComponent: function() {
        Chenxin.UI.EmployeeOprLogs.superclass.initComponent.call(this);
    }
});

/**
*查询面板
*/
Chenxin.UI.EmployeeOprLogsSearch = Chenxin.extend(Chenxin.UI.SearchCommon, {
    id: 'EmployeeOprLogs_search',
    initEvent: function() {
        var _this = this;

        //查询按钮
        $('#btnSreachOprLogs').click(function() {
            _this.scope.reloadGrid("",0);
        });

    },
    createComboList: function() {

        //用户操作日志类型
        var cmboprtype = new Chenxin.UI.Combo({
            actionUrl: '/service/logic/EmployeeOprLogs.ashx?op=getcombolist',
            containerId: '#divOprType',
            name: "OprType",
            tbxWidth: 90,
            autoLoad: true,
            colNum: 3,
            colWidth: 120,
            hasPage: true,
            pageSize: 15,
            hasSearch: true,
            inModelType: 'txt'
        });

        //五级联Combo
        var combl = new Chenxin.UI.StructComboList();
        var structs = combl.comboList;
        structs.push(cmboprtype);

        return structs;
    },
    initComponent: function() {
        Chenxin.UI.EmployeeOprLogsSearch.superclass.initComponent.call(this);
    }
});

$(document).ready(function() {
    this.EmployeeOprLogs = new Chenxin.UI.EmployeeOprLogs();
});